<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>凯盛项目管理系统</title>
	<link rel="stylesheet" href="css/bootstrap.min.css" />

  </head>

  <body>
  	<%@ include file="top.jsp"  %>
    <div class="container">
		<div class="row">
			<div class="span3">
				<div class="well" style="padding: 8px 0;margin-top:80px;" >
					<ul class="nav nav-list">
						<li class="nav-header">${sessionScope.pu.project.name }</li>
						<li>${sessionScope.user.username }:${sessionScope.pu.role }</li>
						<li class="divider"></li>
						<li><a href="project.jspx?id=${sessionScope.pu.projectid }"><i class="icon-home"></i>最新动态</a></li>
						<li><a href="goal.jspx"><i class="icon-flag"></i>目标</a></li>
						<li><a href="document.jspx"><i class="icon-folder-open"></i>资料库</a></li>
						<li class="active"><a href="file.jspx"><i class="icon-file icon-white"></i>文件共享</a></li>
						<li><a href="contact.jspx"><i class="icon-user"></i>联系人</a></li>
						<li><a href="idea.jspx"><i class="icon-fire"></i>想法</a></li>
						<li><a href="#"><i class="icon-warning-sign"></i>Bug</a></li>
						<li><a href="main.jspx?m=editProject&id=${pu.projectid }"><i class="icon-cog"></i>项目设置</a></li>
					</ul>
				</div>
			</div>
			<div class="span9">
				<a href="file.jspx?m=upload&id=${ft.id }" class="btn btn-primary" style="float:right;margin-top:70px;">
					<i class="icon-white  icon-share"></i>上传资料
				</a>
				<div class="clear"></div>
				<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:105px;">
					<li >
						<a href="file.jspx"><i class="icon-th"></i>文件共享</a>>
						<a href="">客户资料</a>
					</li>
					<li class="pull-right">
						<a href=""><i class="icon-trash"></i></a>						
					</li>
				</ul>
				<div class="well" style="border-radius:0px;border-top:0px;">
					<table class="table table-striped" >
						<thead>
							<tr>
								<th width="30px"></th>
								<th width="50%">名称</th>
								<th width="20%">大小</th>
								<th>创建人</th>
								<th></th>
							</tr>
						</thead>
						<tbody>
							<c:if test="${fn:length(fileslist) == 0}">
								<tr>
			 						<td colspan="4" style="color:red">
			  						还没有上传任何文件
			  						</td>	
								</tr>
							</c:if>
							<c:forEach items="${fileslist}" var="f">
								<tr>
									<td><img src="img/file.png"/></td>
									<td><a href="file.jspx?m=down&f=${f.filename }">${f.name}</a></td>
									<td>${f.size}</td>
									<td>${f.user.username }</td>
									<td>
										<a href="file.jspx?m=del&id=${f.id}">
											<i class="icon-trash"></i>						
										</a>
									</td>
								</tr>							
							</c:forEach>
						</tbody>
					</table>
					<a href="file.jspx">←返回</a>
				</div>
			</div>
		</div>
	</div>
  </body>
</html>
